home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10684 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6c 61 | 64 65 2e 6e 65 77 73 2e |Path: la|de.news.|
|00000010| 70 69 70 65 78 2e 6e 65 | 74 21 70 69 70 65 78 21 |pipex.ne|t!pipex!|
|00000020| 64 69 72 63 6f 6e 21 75 | 73 65 6e 65 74 0a 46 72 |dircon!u|senet.Fr|
|00000030| 6f 6d 3a 20 52 6f 62 20 | 61 6e 64 20 53 79 6c 76 |om: Rob |and Sylv|
|00000040| 69 61 20 57 6f 72 73 6e | 6f 70 20 3c 67 69 6c 6c |ia Worsn|op <gill|
|00000050| 65 73 70 40 64 69 72 63 | 6f 6e 2e 63 6f 2e 75 6b |esp@dirc|on.co.uk|
|00000060| 3e 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 63 6f |>.Newsgr|oups: co|
|00000070| 6d 70 2e 6c 61 6e 67 2e | 63 2b 2b 0a 53 75 62 6a |mp.lang.|c++.Subj|
|00000080| 65 63 74 3a 20 52 65 3a | 20 70 72 69 76 61 74 65 |ect: Re:| private|
|00000090| 20 62 61 73 65 20 63 6c | 61 73 73 20 76 73 2e 20 | base cl|ass vs. |
|000000a0| 70 72 69 76 61 74 65 20 | 6d 65 6d 62 65 72 20 6f |private |member o|
|000000b0| 62 6a 65 63 74 0a 44 61 | 74 65 3a 20 39 20 4d 61 |bject.Da|te: 9 Ma|
|000000c0| 72 20 31 39 39 36 20 31 | 30 3a 30 34 3a 31 38 20 |r 1996 1|0:04:18 |
|000000d0| 47 4d 54 0a 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |GMT.Orga|nization|
|000000e0| 3a 20 44 69 72 65 63 74 | 20 43 6f 6e 6e 65 63 74 |: Direct| Connect|
|000000f0| 69 6f 6e 0a 4d 65 73 73 | 61 67 65 2d 49 44 3a 20 |ion.Mess|age-ID: |
|00000100| 3c 34 68 72 6c 33 32 24 | 34 62 33 40 6e 65 77 73 |<4hrl32$|4b3@news|
|00000110| 67 61 74 65 2e 64 69 72 | 63 6f 6e 2e 63 6f 2e 75 |gate.dir|con.co.u|
|00000120| 6b 3e 0a 52 65 66 65 72 | 65 6e 63 65 73 3a 20 3c |k>.Refer|ences: <|
|00000130| 34 68 70 71 71 39 24 39 | 6f 33 40 68 61 63 6b 62 |4hpqq9$9|o3@hackb|
|00000140| 65 72 72 79 2e 7a 69 6c | 6b 65 72 2e 6e 65 74 3e |erry.zil|ker.net>|
|00000150| 0a 4e 4e 54 50 2d 50 6f | 73 74 69 6e 67 2d 48 6f |.NNTP-Po|sting-Ho|
|00000160| 73 74 3a 20 67 77 32 2d | 31 35 39 2e 70 6f 6f 6c |st: gw2-|159.pool|
|00000170| 2e 64 69 72 63 6f 6e 2e | 63 6f 2e 75 6b 0a 4d 69 |.dircon.|co.uk.Mi|
|00000180| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|00000190| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 3a 20 74 65 |Content-|Type: te|
|000001a0| 78 74 2f 70 6c 61 69 6e | 3b 20 63 68 61 72 73 65 |xt/plain|; charse|
|000001b0| 74 3d 75 73 2d 61 73 63 | 69 69 0a 43 6f 6e 74 65 |t=us-asc|ii.Conte|
|000001c0| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|000001d0| 64 69 6e 67 3a 20 37 62 | 69 74 0a 58 2d 4d 61 69 |ding: 7b|it.X-Mai|
|000001e0| 6c 65 72 3a 20 4d 6f 7a | 69 6c 6c 61 20 31 2e 31 |ler: Moz|illa 1.1|
|000001f0| 4e 20 28 57 69 6e 64 6f | 77 73 3b 20 49 3b 20 31 |N (Windo|ws; I; 1|
|00000200| 36 62 69 74 29 0a 54 6f | 3a 20 64 69 40 64 69 33 |6bit).To|: di@di3|
|00000210| 32 37 30 2e 63 6f 6d 0a | 0a 49 27 6d 20 6e 6f 74 |270.com.|.I'm not|
|00000220| 20 73 75 72 65 20 71 75 | 69 74 65 20 77 68 61 74 | sure qu|ite what|
|00000230| 20 79 6f 75 20 6d 65 61 | 6e 20 68 65 72 65 20 73 | you mea|n here s|
|00000240| 6f 20 74 68 65 72 65 20 | 69 73 20 61 20 72 69 73 |o there |is a ris|
|00000250| 6b 20 74 68 61 74 20 49 | 27 6c 6c 0a 62 65 20 61 |k that I|'ll.be a|
|00000260| 6e 73 77 65 72 69 6e 67 | 20 61 20 71 75 65 73 74 |nswering| a quest|
|00000270| 69 6f 6e 20 79 6f 75 27 | 76 65 20 6e 6f 74 20 65 |ion you'|ve not e|
|00000280| 76 65 6e 20 61 73 6b 65 | 64 21 20 41 6e 79 77 61 |ven aske|d! Anywa|
|00000290| 79 20 2c 20 68 65 72 65 | 20 67 6f 65 73 2e 2e 0a |y , here| goes...|
|000002a0| 0a 49 66 20 79 6f 75 20 | 61 72 65 20 61 73 6b 69 |.If you |are aski|
|000002b0| 6e 67 20 77 68 65 6e 20 | 74 6f 20 75 73 65 20 70 |ng when |to use p|
|000002c0| 72 69 76 61 74 65 20 62 | 61 73 65 20 63 6c 61 73 |rivate b|ase clas|
|000002d0| 73 65 73 20 61 6e 64 20 | 77 68 65 6e 20 74 6f 20 |ses and |when to |
|000002e0| 75 73 65 20 61 20 0a 70 | 72 69 76 61 74 65 20 6d |use a .p|rivate m|
|000002f0| 65 6d 62 65 72 20 6f 62 | 6a 65 63 74 2c 20 74 68 |ember ob|ject, th|
|00000300| 65 20 61 6e 73 77 65 72 | 20 69 73 20 74 68 61 74 |e answer| is that|
|00000310| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 70 72 69 | you can| use pri|
|00000320| 76 61 74 65 20 6d 65 6d | 62 65 72 20 0a 6f 62 6a |vate mem|ber .obj|
|00000330| 65 63 74 20 6f 6e 6c 79 | 20 77 68 65 6e 20 79 6f |ect only| when yo|
|00000340| 75 20 63 61 6e 20 64 6f | 20 65 76 65 72 79 74 68 |u can do| everyth|
|00000350| 69 6e 67 20 79 6f 75 20 | 77 61 6e 74 20 77 69 74 |ing you |want wit|
|00000360| 68 20 74 68 61 74 20 6f | 62 6a 65 63 74 27 73 0a |h that o|bject's.|
|00000370| 70 75 62 6c 69 63 20 69 | 6e 74 65 72 66 61 63 65 |public i|nterface|
|00000380| 2e 20 0a 49 66 20 79 6f | 75 20 77 61 6e 74 20 74 |. .If yo|u want t|
|00000390| 6f 20 61 63 63 65 73 73 | 20 70 72 6f 74 65 63 74 |o access| protect|
|000003a0| 65 64 20 6d 65 74 68 6f | 64 73 20 75 73 65 20 70 |ed metho|ds use p|
|000003b0| 72 69 76 61 74 65 20 69 | 6e 68 65 72 69 74 61 6e |rivate i|nheritan|
|000003c0| 63 65 2e 20 0a 53 6f 6d | 65 20 70 65 6f 70 6c 65 |ce. .Som|e people|
|000003d0| 20 6a 75 73 74 20 75 73 | 65 20 70 72 69 76 61 74 | just us|e privat|
|000003e0| 65 20 69 6e 68 65 72 69 | 74 61 6e 63 65 20 61 6e |e inheri|tance an|
|000003f0| 79 77 61 79 20 62 65 63 | 61 75 73 65 20 74 68 65 |yway bec|ause the|
|00000400| 20 63 6f 64 65 20 0a 69 | 73 20 6f 66 74 65 6e 20 | code .i|s often |
|00000410| 63 6c 65 61 6e 65 72 2e | 0a 57 68 65 74 68 65 72 |cleaner.|.Whether|
|00000420| 20 79 6f 75 20 75 73 65 | 20 70 72 69 76 61 74 65 | you use| private|
|00000430| 20 6d 65 6d 62 65 72 20 | 6f 62 6a 65 63 74 73 20 | member |objects |
|00000440| 6f 72 20 70 72 69 76 61 | 74 65 20 69 6e 68 65 72 |or priva|te inher|
|00000450| 69 74 61 6e 63 65 20 64 | 6f 65 73 6e 27 74 0a 6d |itance d|oesn't.m|
|00000460| 61 74 74 65 72 20 61 20 | 67 72 65 61 74 20 64 65 |atter a |great de|
|00000470| 61 6c 2e 20 54 68 65 20 | 72 65 61 6c 6c 79 20 69 |al. The |really i|
|00000480| 6d 70 6f 72 74 61 6e 74 | 20 74 68 69 6e 67 20 69 |mportant| thing i|
|00000490| 73 20 6e 6f 74 20 74 6f | 20 63 6f 6e 66 75 73 65 |s not to| confuse|
|000004a0| 20 0a 70 75 62 6c 69 63 | 20 69 6e 68 65 72 69 74 | .public| inherit|
|000004b0| 61 6e 63 65 20 61 6e 64 | 20 70 72 69 76 61 74 65 |ance and| private|
|000004c0| 20 69 6e 68 65 72 69 74 | 61 6e 63 65 2e 0a 0a 52 | inherit|ance...R|
|000004d0| 6f 62 2e 0a 0a 0a 67 72 | 65 67 6f 72 40 64 69 33 |ob....gr|egor@di3|
|000004e0| 32 37 30 2e 63 6f 6d 20 | 28 47 72 65 67 20 52 69 |270.com |(Greg Ri|
|000004f0| 63 6b 61 72 64 29 20 77 | 72 6f 74 65 3a 0a 3e 49 |ckard) w|rote:.>I|
|00000500| 6e 20 43 61 72 67 69 6c | 6c 27 73 20 43 2b 2b 20 |n Cargil|l's C++ |
|00000510| 50 72 6f 67 72 61 6d 6d | 69 6e 67 20 53 74 79 6c |Programm|ing Styl|
|00000520| 65 2c 20 65 78 65 72 63 | 69 73 65 20 33 2e 31 20 |e, exerc|ise 3.1 |
|00000530| 61 73 6b 73 20 74 68 65 | 20 72 65 61 64 65 72 20 |asks the| reader |
|00000540| 74 6f 20 0a 3e 22 63 72 | 65 61 74 65 20 61 20 63 |to .>"cr|eate a c|
|00000550| 6c 61 73 73 20 74 68 61 | 74 20 6f 62 74 61 69 6e |lass tha|t obtain|
|00000560| 73 20 74 68 65 20 73 65 | 72 76 69 63 65 73 20 6f |s the se|rvices o|
|00000570| 66 20 61 6e 6f 74 68 65 | 72 20 63 6c 61 73 73 20 |f anothe|r class |
|00000580| 74 68 61 74 20 6d 75 73 | 74 20 62 65 20 0a 3e 69 |that mus|t be .>i|
|00000590| 6e 63 6f 72 70 6f 72 61 | 74 65 64 20 61 73 20 61 |ncorpora|ted as a|
|000005a0| 20 70 72 69 76 61 74 65 | 20 62 61 73 65 20 63 6c | private| base cl|
|000005b0| 61 73 73 2e 20 20 53 65 | 63 6f 6e 64 2c 20 63 72 |ass. Se|cond, cr|
|000005c0| 65 61 74 65 20 61 20 63 | 6c 61 73 73 20 69 6e 20 |eate a c|lass in |
|000005d0| 77 68 69 63 68 20 61 20 | 0a 3e 73 65 72 76 69 63 |which a |.>servic|
|000005e0| 65 20 6d 75 73 74 20 62 | 65 20 69 6e 63 6f 72 70 |e must b|e incorp|
|000005f0| 6f 72 61 74 65 64 20 61 | 73 20 61 20 70 72 69 76 |orated a|s a priv|
|00000600| 61 74 65 20 6d 65 6d 62 | 65 72 20 6f 62 6a 65 63 |ate memb|er objec|
|00000610| 74 22 2e 0a 3e 0a 3e 49 | 27 6c 6c 20 61 64 6d 69 |t"..>.>I|'ll admi|
|00000620| 74 20 74 6f 20 62 65 69 | 6e 67 20 73 74 75 6d 70 |t to bei|ng stump|
|00000630| 65 64 2c 20 62 75 74 20 | 49 27 6c 6c 20 61 6c 73 |ed, but |I'll als|
|00000640| 6f 20 61 64 6d 69 74 20 | 74 6f 20 62 65 69 6e 67 |o admit |to being|
|00000650| 20 6e 65 77 20 74 6f 20 | 74 68 69 73 2e 2e 2e 2e | new to |this....|
|00000660| 0a 3e 0a 3e 41 6e 79 20 | 69 64 65 61 73 3f 0a 3e |.>.>Any |ideas?.>|
|00000670| 0a 3e 54 68 69 73 20 69 | 73 20 61 20 76 65 72 79 |.>This i|s a very|
|00000680| 20 74 68 6f 75 67 68 74 | 66 75 6c 20 61 6e 64 20 | thought|ful and |
|00000690| 74 68 6f 75 67 68 74 2d | 70 72 6f 76 6f 6b 69 6e |thought-|provokin|
|000006a0| 67 20 62 6f 6f 6b 2c 20 | 62 79 20 74 68 65 20 77 |g book, |by the w|
|000006b0| 61 79 2e 0a 0a 0a | |ay.... | |
+--------+-------------------------+-------------------------+--------+--------+